package testString;

import java.util.Scanner;

public class TestString {
    public static void main(String[] args) {
        String str1 = "hello";
        for(int i = str1.length()-1; i >= 0; i--) {
            System.out.print(str1.charAt(i) +" ");
        }

        System.out.println();
        String str2 = "hhhehreHHHAHSIadjkAA";
        for(int i = 0; i < str2.length(); i++) {
            if(str2.charAt(i) >= 'A' && str2.charAt(i) <= 'Z')
                System.out.print(str2.charAt(i) +" ");
        }

        System.out.println();
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串:>");
        String str3 = sc.next();
        if(str3.length() < 6){
            System.out.println("长度小于6");
        }
        else{
            System.out.println(str3);
        }

    }
}
